﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.MultiTenancy;
using Volo.Abp;
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Vouchers
{
    public class VoucherDetailBase : AuditedAggregateRoot<Guid>, ISoftDelete, IMultiTenant
    {
        public bool IsDeleted { get; set; } = false;

        public Guid? TenantId { get; set; }

        
        [Comment("单据编号")]
        [MaxLength(100)]
        public string VoucherCode { get; set; }
   
        [Comment("入库单Id")]
        public Guid VoucherId { get; set; }

        
        [Comment("行号")]
        public int VoucherLine { get; set; }

        [Comment("产品编码")]
        [MaxLength(100)]
        public string ProductCode { get; set; }

        [Comment("产品名称")]
        [MaxLength(300)]
        public string ProductName { get; set; }

        [Comment("单价")]
        [Column(TypeName = "decimal(18,4)")]
        public decimal Price { get; set; }

   

        [Comment("规格")]
        [MaxLength(100)]
        public string Specification { get; set; }

        [Comment("单位")]
        [MaxLength(100)]
        public string Unit { get; set; }

        [Comment("批次")]
        [MaxLength(100)]
        public string ProductBatch { get; set; }

        [Comment("生产日期")]
        public DateTime? ProductDate { get; set; }

        [Comment("有效期")]
        public DateTime ExpiryDate { get; set; }

        [Comment("生厂商标识")]
        public Guid ManufacturerId { get; set; }

        [Comment("生厂商名称")]
        [MaxLength(200)]
        public string ManufacturerName { get; set; }
        [Comment("跟踪码")]
        [MaxLength(100)]
        public string TrackCode { get; set; }
    }
}
